package com.neuedu.hw20190214;

public class ColaEmployee {
    //成员变量
    private String empName;
    private int empBirthdayMonth;

    //行为方法

    /**
     * 获取员工制定月份工资
     * @param month  计算工资的月份
     * @return 制定月份的工资
     */
    public Double getSalary(int month){
        //工资
        Double mySalary=0.0;
        //计算员工是否可以获取生日金
        if (month == this.empBirthdayMonth){
            //获得生日金
            mySalary+=100;
        }
        return mySalary;
    }


    //自定义默认构造方法
    public ColaEmployee(String empName, int empBirthdayMonth) {
        this.empName = empName;
        this.empBirthdayMonth = empBirthdayMonth;
    }

    // 显式写出的默认构造方法
    public ColaEmployee() {
    }

    public String getEmpName() {
        return empName;
    }

    public void setEmpName(String empName) {
        this.empName = empName;
    }

    public int getEmpBirthdayMonth() {
        return empBirthdayMonth;
    }

    public void setEmpBirthdayMonth(int empBirthdayMonth) {
        this.empBirthdayMonth = empBirthdayMonth;
    }
}
